<!-- HTML header for doxygen 1.8.8-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <!-- For Mobile Devices -->
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
        <meta name="generator" content="Doxygen 1.8.17"/>
        <script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
        <title>QuEST: SubListGenerator Class Reference</title>
        <!--<link href="tabs.css" rel="stylesheet" type="text/css"/>-->
        <script type="text/javascript" src="dynsections.js"></script>
        <link href="doxygen.css" rel="stylesheet" type="text/css" />
        <link href="style.css" rel="stylesheet" type="text/css"/>
        <link href='https://fonts.googleapis.com/css?family=Roboto+Slab' rel='stylesheet' type='text/css'>
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
        <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
        <link href="jquery.smartmenus.bootstrap.css" rel="stylesheet">
        <script type="text/javascript" src="jquery.smartmenus.js"></script>
        <!-- SmartMenus jQuery Bootstrap Addon -->
        <script type="text/javascript" src="jquery.smartmenus.bootstrap.js"></script>
        <!-- SmartMenus jQuery plugin -->
    </head>
    <body>
        <nav class="navbar navbar-default" role="navigation">
            <div class="container">
                <div class="navbar-header">
                    <a class="navbar-brand"><img alt="Logo" src="logo.png"/></a>
                    <a class="navbar-brand"><b>QuEST</b> v3.2.0<br>The Quantum Exact Simulation Toolkit</a>
                </div>
            </div>
        </nav>
        <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
            <div class="content" id="content">
                <div class="container">
                    <div class="row">
                        <div class="col-sm-12 panel " style="padding-bottom: 15px;">
                            <div style="margin-bottom: 15px;">
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',false,false,'search.php','Search');
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pri-methods">Private Member Functions</a> &#124;
<a href="#pri-attribs">Private Attributes</a>  </div>
  <div class="headertitle">
<div class="title">SubListGenerator Class Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="dynheader">
Inheritance diagram for SubListGenerator:</div>
<div class="dyncontent">
 <div class="center">
  <img src="classSubListGenerator.png" alt=""/>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a7ae1f7ed0731d93f694a6d80cfa827e4"><td class="memItemLeft" align="right" valign="top">int *const  &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSubListGenerator.html#a7ae1f7ed0731d93f694a6d80cfa827e4">get</a> () const override</td></tr>
<tr class="separator:a7ae1f7ed0731d93f694a6d80cfa827e4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a87ae3a003063535f2cd34905593efc97"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSubListGenerator.html#a87ae3a003063535f2cd34905593efc97">next</a> () override</td></tr>
<tr class="separator:a87ae3a003063535f2cd34905593efc97"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abed6025a9c0b87bcf3b19b3548787ec5"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSubListGenerator.html#abed6025a9c0b87bcf3b19b3548787ec5">SubListGenerator</a> (Catch::Generators::GeneratorWrapper&lt; int &gt; &amp;&amp;gen, int numSamps, const int *exclude, int numExclude)</td></tr>
<tr class="separator:abed6025a9c0b87bcf3b19b3548787ec5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac330be89ad66eb53684ea724bc320274"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSubListGenerator.html#ac330be89ad66eb53684ea724bc320274">SubListGenerator</a> (int *elems, int numElems, int numSamps)</td></tr>
<tr class="separator:ac330be89ad66eb53684ea724bc320274"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a097b2ccb4f0dafc51bf3241ea944db5a"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSubListGenerator.html#a097b2ccb4f0dafc51bf3241ea944db5a">~SubListGenerator</a> ()</td></tr>
<tr class="separator:a097b2ccb4f0dafc51bf3241ea944db5a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-methods"></a>
Private Member Functions</h2></td></tr>
<tr class="memitem:a1d6f502f5fb36c1eba4654553d3f014f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSubListGenerator.html#a1d6f502f5fb36c1eba4654553d3f014f">createSublist</a> ()</td></tr>
<tr class="separator:a1d6f502f5fb36c1eba4654553d3f014f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a55d93b6da9e96013873a4b65daabcfa1"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSubListGenerator.html#a55d93b6da9e96013873a4b65daabcfa1">prepareSublist</a> ()</td></tr>
<tr class="separator:a55d93b6da9e96013873a4b65daabcfa1"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-attribs"></a>
Private Attributes</h2></td></tr>
<tr class="memitem:a50e7830a9623f44ad854bcc9a0119f5b"><td class="memItemLeft" align="right" valign="top">vector&lt; bool &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSubListGenerator.html#a50e7830a9623f44ad854bcc9a0119f5b">featured</a></td></tr>
<tr class="separator:a50e7830a9623f44ad854bcc9a0119f5b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9455720d1e08225c6b1e12a2a58133b2"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSubListGenerator.html#a9455720d1e08225c6b1e12a2a58133b2">len</a></td></tr>
<tr class="separator:a9455720d1e08225c6b1e12a2a58133b2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6cc17992795712abb3e9bb4ca615c780"><td class="memItemLeft" align="right" valign="top">int *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSubListGenerator.html#a6cc17992795712abb3e9bb4ca615c780">list</a></td></tr>
<tr class="separator:a6cc17992795712abb3e9bb4ca615c780"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad70d3502f47c9b08f2a415c0471023c7"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSubListGenerator.html#ad70d3502f47c9b08f2a415c0471023c7">sublen</a></td></tr>
<tr class="separator:ad70d3502f47c9b08f2a415c0471023c7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a02b6d786dfbbce60471fd7a55e23ea75"><td class="memItemLeft" align="right" valign="top">int *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSubListGenerator.html#a02b6d786dfbbce60471fd7a55e23ea75">sublist</a></td></tr>
<tr class="separator:a02b6d786dfbbce60471fd7a55e23ea75"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock">
<p class="definition">Definition at line <a class="el" href="utilities_8cpp_source.html#l01099">1099</a> of file <a class="el" href="utilities_8cpp_source.html">utilities.cpp</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="ac330be89ad66eb53684ea724bc320274"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac330be89ad66eb53684ea724bc320274">&#9670;&nbsp;</a></span>SubListGenerator() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">SubListGenerator::SubListGenerator </td>
          <td>(</td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>elems</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>numElems</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>numSamps</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="utilities_8cpp_source.html#l01128">1128</a> of file <a class="el" href="utilities_8cpp_source.html">utilities.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l01128"></a><span class="lineno"> 1128</span>&#160;                                                             {</div>
<div class="line"><a name="l01129"></a><span class="lineno"> 1129</span>&#160;        </div>
<div class="line"><a name="l01130"></a><span class="lineno"> 1130</span>&#160;        <a class="code" href="utilities_8cpp.html#aba8ab64f4403dbfbd5a38902939535ff">DEMAND</a>( numSamps &lt;= numElems );</div>
<div class="line"><a name="l01131"></a><span class="lineno"> 1131</span>&#160;                </div>
<div class="line"><a name="l01132"></a><span class="lineno"> 1132</span>&#160;        <span class="comment">// make a record of all elements</span></div>
<div class="line"><a name="l01133"></a><span class="lineno"> 1133</span>&#160;        <a class="code" href="classSubListGenerator.html#a9455720d1e08225c6b1e12a2a58133b2">len</a> = numElems;</div>
<div class="line"><a name="l01134"></a><span class="lineno"> 1134</span>&#160;        <a class="code" href="classSubListGenerator.html#a6cc17992795712abb3e9bb4ca615c780">list</a> = (<span class="keywordtype">int</span>*) malloc(<a class="code" href="classSubListGenerator.html#a9455720d1e08225c6b1e12a2a58133b2">len</a> * <span class="keyword">sizeof</span> *<a class="code" href="classSubListGenerator.html#a6cc17992795712abb3e9bb4ca615c780">list</a>);</div>
<div class="line"><a name="l01135"></a><span class="lineno"> 1135</span>&#160;        <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i=0; i&lt;<a class="code" href="classSubListGenerator.html#a9455720d1e08225c6b1e12a2a58133b2">len</a>; i++)</div>
<div class="line"><a name="l01136"></a><span class="lineno"> 1136</span>&#160;            <a class="code" href="classSubListGenerator.html#a6cc17992795712abb3e9bb4ca615c780">list</a>[i] = elems[i];</div>
<div class="line"><a name="l01137"></a><span class="lineno"> 1137</span>&#160;        </div>
<div class="line"><a name="l01138"></a><span class="lineno"> 1138</span>&#160;        <span class="comment">// prepare sublist</span></div>
<div class="line"><a name="l01139"></a><span class="lineno"> 1139</span>&#160;        <a class="code" href="classSubListGenerator.html#ad70d3502f47c9b08f2a415c0471023c7">sublen</a> = numSamps;</div>
<div class="line"><a name="l01140"></a><span class="lineno"> 1140</span>&#160;        <a class="code" href="classSubListGenerator.html#a1d6f502f5fb36c1eba4654553d3f014f">createSublist</a>();</div>
<div class="line"><a name="l01141"></a><span class="lineno"> 1141</span>&#160;        <a class="code" href="classSubListGenerator.html#a55d93b6da9e96013873a4b65daabcfa1">prepareSublist</a>();  </div>
<div class="line"><a name="l01142"></a><span class="lineno"> 1142</span>&#160;    }</div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="utilities_8cpp_source.html#l01106">createSublist()</a>, <a class="el" href="utilities_8cpp_source.html#l00024">DEMAND</a>, <a class="el" href="utilities_8cpp_source.html#l01102">len</a>, <a class="el" href="utilities_8cpp_source.html#l01100">list</a>, <a class="el" href="utilities_8cpp_source.html#l01116">prepareSublist()</a>, and <a class="el" href="utilities_8cpp_source.html#l01103">sublen</a>.</p>

</div>
</div>
<a id="abed6025a9c0b87bcf3b19b3548787ec5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abed6025a9c0b87bcf3b19b3548787ec5">&#9670;&nbsp;</a></span>SubListGenerator() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">SubListGenerator::SubListGenerator </td>
          <td>(</td>
          <td class="paramtype">Catch::Generators::GeneratorWrapper&lt; int &gt; &amp;&amp;&#160;</td>
          <td class="paramname"><em>gen</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>numSamps</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int *&#160;</td>
          <td class="paramname"><em>exclude</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>numExclude</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="utilities_8cpp_source.html#l01144">1144</a> of file <a class="el" href="utilities_8cpp_source.html">utilities.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l01147"></a><span class="lineno"> 1147</span>&#160;      {    </div>
<div class="line"><a name="l01148"></a><span class="lineno"> 1148</span>&#160;        <span class="comment">// extract all generator elems</span></div>
<div class="line"><a name="l01149"></a><span class="lineno"> 1149</span>&#160;        vector&lt;int&gt; elems = vector&lt;int&gt;();</div>
<div class="line"><a name="l01150"></a><span class="lineno"> 1150</span>&#160;        <span class="keywordflow">do</span> { elems.push_back(gen.get()); } <span class="keywordflow">while</span> (gen.next());</div>
<div class="line"><a name="l01151"></a><span class="lineno"> 1151</span>&#160;        </div>
<div class="line"><a name="l01152"></a><span class="lineno"> 1152</span>&#160;        <span class="comment">// make (int*) of non-excluded elems</span></div>
<div class="line"><a name="l01153"></a><span class="lineno"> 1153</span>&#160;        <a class="code" href="classSubListGenerator.html#a9455720d1e08225c6b1e12a2a58133b2">len</a> = 0;</div>
<div class="line"><a name="l01154"></a><span class="lineno"> 1154</span>&#160;        <a class="code" href="classSubListGenerator.html#a6cc17992795712abb3e9bb4ca615c780">list</a> = (<span class="keywordtype">int</span>*) malloc(elems.size() * <span class="keyword">sizeof</span> *<a class="code" href="classSubListGenerator.html#a6cc17992795712abb3e9bb4ca615c780">list</a>);</div>
<div class="line"><a name="l01155"></a><span class="lineno"> 1155</span>&#160;        <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i=0; i&lt;elems.size(); i++) {</div>
<div class="line"><a name="l01156"></a><span class="lineno"> 1156</span>&#160;            <span class="keywordtype">int</span> elem = elems[i];</div>
<div class="line"><a name="l01157"></a><span class="lineno"> 1157</span>&#160;            <span class="keywordtype">bool</span> present = <span class="keyword">false</span>;</div>
<div class="line"><a name="l01158"></a><span class="lineno"> 1158</span>&#160;            <span class="keywordflow">for</span> (<span class="keywordtype">int</span> j=0; j&lt;numExclude; j++)</div>
<div class="line"><a name="l01159"></a><span class="lineno"> 1159</span>&#160;                <span class="keywordflow">if</span> (elem == exclude[j]) {</div>
<div class="line"><a name="l01160"></a><span class="lineno"> 1160</span>&#160;                    present = <span class="keyword">true</span>;</div>
<div class="line"><a name="l01161"></a><span class="lineno"> 1161</span>&#160;                    <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l01162"></a><span class="lineno"> 1162</span>&#160;                }</div>
<div class="line"><a name="l01163"></a><span class="lineno"> 1163</span>&#160;            <span class="keywordflow">if</span> (!present)</div>
<div class="line"><a name="l01164"></a><span class="lineno"> 1164</span>&#160;                <a class="code" href="classSubListGenerator.html#a6cc17992795712abb3e9bb4ca615c780">list</a>[<a class="code" href="classSubListGenerator.html#a9455720d1e08225c6b1e12a2a58133b2">len</a>++] = elem;</div>
<div class="line"><a name="l01165"></a><span class="lineno"> 1165</span>&#160;        }</div>
<div class="line"><a name="l01166"></a><span class="lineno"> 1166</span>&#160;        </div>
<div class="line"><a name="l01167"></a><span class="lineno"> 1167</span>&#160;        <a class="code" href="utilities_8cpp.html#aba8ab64f4403dbfbd5a38902939535ff">DEMAND</a>( numSamps &lt;= <a class="code" href="classSubListGenerator.html#a9455720d1e08225c6b1e12a2a58133b2">len</a> );</div>
<div class="line"><a name="l01168"></a><span class="lineno"> 1168</span>&#160; </div>
<div class="line"><a name="l01169"></a><span class="lineno"> 1169</span>&#160;        <span class="comment">// prepare sublist</span></div>
<div class="line"><a name="l01170"></a><span class="lineno"> 1170</span>&#160;        <a class="code" href="classSubListGenerator.html#ad70d3502f47c9b08f2a415c0471023c7">sublen</a> = numSamps;</div>
<div class="line"><a name="l01171"></a><span class="lineno"> 1171</span>&#160;        <a class="code" href="classSubListGenerator.html#a1d6f502f5fb36c1eba4654553d3f014f">createSublist</a>();</div>
<div class="line"><a name="l01172"></a><span class="lineno"> 1172</span>&#160;        <a class="code" href="classSubListGenerator.html#a55d93b6da9e96013873a4b65daabcfa1">prepareSublist</a>();</div>
<div class="line"><a name="l01173"></a><span class="lineno"> 1173</span>&#160;    }</div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="utilities_8cpp_source.html#l01106">createSublist()</a>, <a class="el" href="utilities_8cpp_source.html#l00024">DEMAND</a>, <a class="el" href="utilities_8cpp_source.html#l01102">len</a>, <a class="el" href="utilities_8cpp_source.html#l01100">list</a>, <a class="el" href="utilities_8cpp_source.html#l01116">prepareSublist()</a>, and <a class="el" href="utilities_8cpp_source.html#l01103">sublen</a>.</p>

</div>
</div>
<a id="a097b2ccb4f0dafc51bf3241ea944db5a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a097b2ccb4f0dafc51bf3241ea944db5a">&#9670;&nbsp;</a></span>~SubListGenerator()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">SubListGenerator::~SubListGenerator </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="utilities_8cpp_source.html#l01194">1194</a> of file <a class="el" href="utilities_8cpp_source.html">utilities.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l01194"></a><span class="lineno"> 1194</span>&#160;                        {</div>
<div class="line"><a name="l01195"></a><span class="lineno"> 1195</span>&#160;        free(<a class="code" href="classSubListGenerator.html#a6cc17992795712abb3e9bb4ca615c780">list</a>);</div>
<div class="line"><a name="l01196"></a><span class="lineno"> 1196</span>&#160;        free(<a class="code" href="classSubListGenerator.html#a02b6d786dfbbce60471fd7a55e23ea75">sublist</a>);</div>
<div class="line"><a name="l01197"></a><span class="lineno"> 1197</span>&#160;    }</div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="utilities_8cpp_source.html#l01100">list</a>, and <a class="el" href="utilities_8cpp_source.html#l01101">sublist</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a1d6f502f5fb36c1eba4654553d3f014f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1d6f502f5fb36c1eba4654553d3f014f">&#9670;&nbsp;</a></span>createSublist()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void SubListGenerator::createSublist </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="utilities_8cpp_source.html#l01106">1106</a> of file <a class="el" href="utilities_8cpp_source.html">utilities.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l01106"></a><span class="lineno"> 1106</span>&#160;                         {</div>
<div class="line"><a name="l01107"></a><span class="lineno"> 1107</span>&#160;        </div>
<div class="line"><a name="l01108"></a><span class="lineno"> 1108</span>&#160;        <span class="comment">// sublist to send to the user</span></div>
<div class="line"><a name="l01109"></a><span class="lineno"> 1109</span>&#160;        <a class="code" href="classSubListGenerator.html#a02b6d786dfbbce60471fd7a55e23ea75">sublist</a> = (<span class="keywordtype">int</span>*) malloc(<a class="code" href="classSubListGenerator.html#ad70d3502f47c9b08f2a415c0471023c7">sublen</a> * <span class="keyword">sizeof</span> *<a class="code" href="classSubListGenerator.html#a02b6d786dfbbce60471fd7a55e23ea75">sublist</a>);</div>
<div class="line"><a name="l01110"></a><span class="lineno"> 1110</span>&#160;        </div>
<div class="line"><a name="l01111"></a><span class="lineno"> 1111</span>&#160;        <span class="comment">// indicates which list members are currently in sublist</span></div>
<div class="line"><a name="l01112"></a><span class="lineno"> 1112</span>&#160;        <a class="code" href="classSubListGenerator.html#a50e7830a9623f44ad854bcc9a0119f5b">featured</a> = vector&lt;bool&gt;(<a class="code" href="classSubListGenerator.html#a9455720d1e08225c6b1e12a2a58133b2">len</a>);</div>
<div class="line"><a name="l01113"></a><span class="lineno"> 1113</span>&#160;        fill(<a class="code" href="classSubListGenerator.html#a50e7830a9623f44ad854bcc9a0119f5b">featured</a>.end() - <a class="code" href="classSubListGenerator.html#ad70d3502f47c9b08f2a415c0471023c7">sublen</a>, <a class="code" href="classSubListGenerator.html#a50e7830a9623f44ad854bcc9a0119f5b">featured</a>.end(), <span class="keyword">true</span>);   </div>
<div class="line"><a name="l01114"></a><span class="lineno"> 1114</span>&#160;    }</div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="utilities_8cpp_source.html#l01104">featured</a>, <a class="el" href="utilities_8cpp_source.html#l01102">len</a>, <a class="el" href="utilities_8cpp_source.html#l01103">sublen</a>, and <a class="el" href="utilities_8cpp_source.html#l01101">sublist</a>.</p>

<p class="reference">Referenced by <a class="el" href="utilities_8cpp_source.html#l01128">SubListGenerator()</a>.</p>

</div>
</div>
<a id="a7ae1f7ed0731d93f694a6d80cfa827e4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7ae1f7ed0731d93f694a6d80cfa827e4">&#9670;&nbsp;</a></span>get()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int* const&amp; SubListGenerator::get </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">override</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="utilities_8cpp_source.html#l01175">1175</a> of file <a class="el" href="utilities_8cpp_source.html">utilities.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l01175"></a><span class="lineno"> 1175</span>&#160;                                     {</div>
<div class="line"><a name="l01176"></a><span class="lineno"> 1176</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="classSubListGenerator.html#a02b6d786dfbbce60471fd7a55e23ea75">sublist</a>;</div>
<div class="line"><a name="l01177"></a><span class="lineno"> 1177</span>&#160;    }</div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="utilities_8cpp_source.html#l01101">sublist</a>.</p>

</div>
</div>
<a id="a87ae3a003063535f2cd34905593efc97"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a87ae3a003063535f2cd34905593efc97">&#9670;&nbsp;</a></span>next()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool SubListGenerator::next </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">override</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="utilities_8cpp_source.html#l01179">1179</a> of file <a class="el" href="utilities_8cpp_source.html">utilities.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l01179"></a><span class="lineno"> 1179</span>&#160;                         {</div>
<div class="line"><a name="l01180"></a><span class="lineno"> 1180</span>&#160;        </div>
<div class="line"><a name="l01181"></a><span class="lineno"> 1181</span>&#160;        <span class="comment">// offer next permutation of the current combination</span></div>
<div class="line"><a name="l01182"></a><span class="lineno"> 1182</span>&#160;        <span class="keywordflow">if</span> (next_permutation(<a class="code" href="classSubListGenerator.html#a02b6d786dfbbce60471fd7a55e23ea75">sublist</a>, <a class="code" href="classSubListGenerator.html#a02b6d786dfbbce60471fd7a55e23ea75">sublist</a>+<a class="code" href="classSubListGenerator.html#ad70d3502f47c9b08f2a415c0471023c7">sublen</a>))</div>
<div class="line"><a name="l01183"></a><span class="lineno"> 1183</span>&#160;            <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
<div class="line"><a name="l01184"></a><span class="lineno"> 1184</span>&#160; </div>
<div class="line"><a name="l01185"></a><span class="lineno"> 1185</span>&#160;        <span class="comment">// else generate the next combination</span></div>
<div class="line"><a name="l01186"></a><span class="lineno"> 1186</span>&#160;        <span class="keywordflow">if</span> (next_permutation(<a class="code" href="classSubListGenerator.html#a50e7830a9623f44ad854bcc9a0119f5b">featured</a>.begin(), <a class="code" href="classSubListGenerator.html#a50e7830a9623f44ad854bcc9a0119f5b">featured</a>.end())) {</div>
<div class="line"><a name="l01187"></a><span class="lineno"> 1187</span>&#160;            <a class="code" href="classSubListGenerator.html#a55d93b6da9e96013873a4b65daabcfa1">prepareSublist</a>();</div>
<div class="line"><a name="l01188"></a><span class="lineno"> 1188</span>&#160;            <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
<div class="line"><a name="l01189"></a><span class="lineno"> 1189</span>&#160;        }</div>
<div class="line"><a name="l01190"></a><span class="lineno"> 1190</span>&#160;        </div>
<div class="line"><a name="l01191"></a><span class="lineno"> 1191</span>&#160;        <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line"><a name="l01192"></a><span class="lineno"> 1192</span>&#160;    }</div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="utilities_8cpp_source.html#l01104">featured</a>, <a class="el" href="utilities_8cpp_source.html#l01116">prepareSublist()</a>, <a class="el" href="utilities_8cpp_source.html#l01103">sublen</a>, and <a class="el" href="utilities_8cpp_source.html#l01101">sublist</a>.</p>

</div>
</div>
<a id="a55d93b6da9e96013873a4b65daabcfa1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a55d93b6da9e96013873a4b65daabcfa1">&#9670;&nbsp;</a></span>prepareSublist()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void SubListGenerator::prepareSublist </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="utilities_8cpp_source.html#l01116">1116</a> of file <a class="el" href="utilities_8cpp_source.html">utilities.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l01116"></a><span class="lineno"> 1116</span>&#160;                          {</div>
<div class="line"><a name="l01117"></a><span class="lineno"> 1117</span>&#160;        </div>
<div class="line"><a name="l01118"></a><span class="lineno"> 1118</span>&#160;        <span class="comment">// choose the next combination</span></div>
<div class="line"><a name="l01119"></a><span class="lineno"> 1119</span>&#160;        <span class="keywordtype">int</span> j=0;</div>
<div class="line"><a name="l01120"></a><span class="lineno"> 1120</span>&#160;        <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i=0; i&lt;<a class="code" href="classSubListGenerator.html#a9455720d1e08225c6b1e12a2a58133b2">len</a>; i++)</div>
<div class="line"><a name="l01121"></a><span class="lineno"> 1121</span>&#160;            <span class="keywordflow">if</span> (<a class="code" href="classSubListGenerator.html#a50e7830a9623f44ad854bcc9a0119f5b">featured</a>[i])</div>
<div class="line"><a name="l01122"></a><span class="lineno"> 1122</span>&#160;                <a class="code" href="classSubListGenerator.html#a02b6d786dfbbce60471fd7a55e23ea75">sublist</a>[j++] = <a class="code" href="classSubListGenerator.html#a6cc17992795712abb3e9bb4ca615c780">list</a>[i];</div>
<div class="line"><a name="l01123"></a><span class="lineno"> 1123</span>&#160;                </div>
<div class="line"><a name="l01124"></a><span class="lineno"> 1124</span>&#160;        <span class="comment">// prepare for permuting</span></div>
<div class="line"><a name="l01125"></a><span class="lineno"> 1125</span>&#160;        std::sort(<a class="code" href="classSubListGenerator.html#a02b6d786dfbbce60471fd7a55e23ea75">sublist</a>, <a class="code" href="classSubListGenerator.html#a02b6d786dfbbce60471fd7a55e23ea75">sublist</a>+<a class="code" href="classSubListGenerator.html#ad70d3502f47c9b08f2a415c0471023c7">sublen</a>);</div>
<div class="line"><a name="l01126"></a><span class="lineno"> 1126</span>&#160;    }</div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="utilities_8cpp_source.html#l01104">featured</a>, <a class="el" href="utilities_8cpp_source.html#l01102">len</a>, <a class="el" href="utilities_8cpp_source.html#l01100">list</a>, <a class="el" href="utilities_8cpp_source.html#l01103">sublen</a>, and <a class="el" href="utilities_8cpp_source.html#l01101">sublist</a>.</p>

<p class="reference">Referenced by <a class="el" href="utilities_8cpp_source.html#l01179">next()</a>, and <a class="el" href="utilities_8cpp_source.html#l01128">SubListGenerator()</a>.</p>

</div>
</div>
<h2 class="groupheader">Field Documentation</h2>
<a id="a50e7830a9623f44ad854bcc9a0119f5b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a50e7830a9623f44ad854bcc9a0119f5b">&#9670;&nbsp;</a></span>featured</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">vector&lt;bool&gt; SubListGenerator::featured</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="utilities_8cpp_source.html#l01104">1104</a> of file <a class="el" href="utilities_8cpp_source.html">utilities.cpp</a>.</p>

<p class="reference">Referenced by <a class="el" href="utilities_8cpp_source.html#l01106">createSublist()</a>, <a class="el" href="utilities_8cpp_source.html#l01179">next()</a>, and <a class="el" href="utilities_8cpp_source.html#l01116">prepareSublist()</a>.</p>

</div>
</div>
<a id="a9455720d1e08225c6b1e12a2a58133b2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9455720d1e08225c6b1e12a2a58133b2">&#9670;&nbsp;</a></span>len</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int SubListGenerator::len</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="utilities_8cpp_source.html#l01102">1102</a> of file <a class="el" href="utilities_8cpp_source.html">utilities.cpp</a>.</p>

<p class="reference">Referenced by <a class="el" href="utilities_8cpp_source.html#l01106">createSublist()</a>, <a class="el" href="utilities_8cpp_source.html#l01116">prepareSublist()</a>, and <a class="el" href="utilities_8cpp_source.html#l01128">SubListGenerator()</a>.</p>

</div>
</div>
<a id="a6cc17992795712abb3e9bb4ca615c780"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6cc17992795712abb3e9bb4ca615c780">&#9670;&nbsp;</a></span>list</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int* SubListGenerator::list</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="utilities_8cpp_source.html#l01100">1100</a> of file <a class="el" href="utilities_8cpp_source.html">utilities.cpp</a>.</p>

<p class="reference">Referenced by <a class="el" href="utilities_8cpp_source.html#l01116">prepareSublist()</a>, <a class="el" href="utilities_8cpp_source.html#l01128">SubListGenerator()</a>, and <a class="el" href="utilities_8cpp_source.html#l01194">~SubListGenerator()</a>.</p>

</div>
</div>
<a id="ad70d3502f47c9b08f2a415c0471023c7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad70d3502f47c9b08f2a415c0471023c7">&#9670;&nbsp;</a></span>sublen</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int SubListGenerator::sublen</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="utilities_8cpp_source.html#l01103">1103</a> of file <a class="el" href="utilities_8cpp_source.html">utilities.cpp</a>.</p>

<p class="reference">Referenced by <a class="el" href="utilities_8cpp_source.html#l01106">createSublist()</a>, <a class="el" href="utilities_8cpp_source.html#l01179">next()</a>, <a class="el" href="utilities_8cpp_source.html#l01116">prepareSublist()</a>, and <a class="el" href="utilities_8cpp_source.html#l01128">SubListGenerator()</a>.</p>

</div>
</div>
<a id="a02b6d786dfbbce60471fd7a55e23ea75"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a02b6d786dfbbce60471fd7a55e23ea75">&#9670;&nbsp;</a></span>sublist</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int* SubListGenerator::sublist</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="utilities_8cpp_source.html#l01101">1101</a> of file <a class="el" href="utilities_8cpp_source.html">utilities.cpp</a>.</p>

<p class="reference">Referenced by <a class="el" href="utilities_8cpp_source.html#l01106">createSublist()</a>, <a class="el" href="utilities_8cpp_source.html#l01175">get()</a>, <a class="el" href="utilities_8cpp_source.html#l01179">next()</a>, <a class="el" href="utilities_8cpp_source.html#l01116">prepareSublist()</a>, and <a class="el" href="utilities_8cpp_source.html#l01194">~SubListGenerator()</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="utilities_8cpp_source.html">utilities.cpp</a></li>
</ul>
</div><!-- contents -->
<div class="ttc" id="aclassSubListGenerator_html_a6cc17992795712abb3e9bb4ca615c780"><div class="ttname"><a href="classSubListGenerator.html#a6cc17992795712abb3e9bb4ca615c780">SubListGenerator::list</a></div><div class="ttdeci">int * list</div><div class="ttdef"><b>Definition:</b> <a href="utilities_8cpp_source.html#l01100">utilities.cpp:1100</a></div></div>
<div class="ttc" id="aclassSubListGenerator_html_a02b6d786dfbbce60471fd7a55e23ea75"><div class="ttname"><a href="classSubListGenerator.html#a02b6d786dfbbce60471fd7a55e23ea75">SubListGenerator::sublist</a></div><div class="ttdeci">int * sublist</div><div class="ttdef"><b>Definition:</b> <a href="utilities_8cpp_source.html#l01101">utilities.cpp:1101</a></div></div>
<div class="ttc" id="aclassSubListGenerator_html_a9455720d1e08225c6b1e12a2a58133b2"><div class="ttname"><a href="classSubListGenerator.html#a9455720d1e08225c6b1e12a2a58133b2">SubListGenerator::len</a></div><div class="ttdeci">int len</div><div class="ttdef"><b>Definition:</b> <a href="utilities_8cpp_source.html#l01102">utilities.cpp:1102</a></div></div>
<div class="ttc" id="aclassSubListGenerator_html_a50e7830a9623f44ad854bcc9a0119f5b"><div class="ttname"><a href="classSubListGenerator.html#a50e7830a9623f44ad854bcc9a0119f5b">SubListGenerator::featured</a></div><div class="ttdeci">vector&lt; bool &gt; featured</div><div class="ttdef"><b>Definition:</b> <a href="utilities_8cpp_source.html#l01104">utilities.cpp:1104</a></div></div>
<div class="ttc" id="aclassSubListGenerator_html_a55d93b6da9e96013873a4b65daabcfa1"><div class="ttname"><a href="classSubListGenerator.html#a55d93b6da9e96013873a4b65daabcfa1">SubListGenerator::prepareSublist</a></div><div class="ttdeci">void prepareSublist()</div><div class="ttdef"><b>Definition:</b> <a href="utilities_8cpp_source.html#l01116">utilities.cpp:1116</a></div></div>
<div class="ttc" id="aclassSubListGenerator_html_a1d6f502f5fb36c1eba4654553d3f014f"><div class="ttname"><a href="classSubListGenerator.html#a1d6f502f5fb36c1eba4654553d3f014f">SubListGenerator::createSublist</a></div><div class="ttdeci">void createSublist()</div><div class="ttdef"><b>Definition:</b> <a href="utilities_8cpp_source.html#l01106">utilities.cpp:1106</a></div></div>
<div class="ttc" id="aclassSubListGenerator_html_ad70d3502f47c9b08f2a415c0471023c7"><div class="ttname"><a href="classSubListGenerator.html#ad70d3502f47c9b08f2a415c0471023c7">SubListGenerator::sublen</a></div><div class="ttdeci">int sublen</div><div class="ttdef"><b>Definition:</b> <a href="utilities_8cpp_source.html#l01103">utilities.cpp:1103</a></div></div>
<div class="ttc" id="autilities_8cpp_html_aba8ab64f4403dbfbd5a38902939535ff"><div class="ttname"><a href="utilities_8cpp.html#aba8ab64f4403dbfbd5a38902939535ff">DEMAND</a></div><div class="ttdeci">#define DEMAND(cond)</div><div class="ttdef"><b>Definition:</b> <a href="utilities_8cpp_source.html#l00024">utilities.cpp:24</a></div></div>
<!-- HTML footer for doxygen 1.8.8-->
<!-- start footer part -->
</div>
</div>
</div>
</div>
</div>
</body>
        <script type="text/javascript" src="boot.js"></script>
</html>
